package me.zhengjie.modules.finace_taxation.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.EqualsAndHashCode;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.sql.Timestamp;

/**
* @author 杨荣森
* @date 2021-06-23
*/
@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("ft_service")
public class FtService implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type= IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "服务标题")
    private String title;

    @ApiModelProperty(value = "服务介绍")
    private String introduction;

    @ApiModelProperty(value = "现价")
    private BigDecimal price;

    @ApiModelProperty(value = "原件")
    private BigDecimal oldPrice;

    @ApiModelProperty(value = "咨询人数")
    private Integer advisoryNumber;

    @ApiModelProperty(value = "是否上架：1.是，0.否")
    private Integer putShelf;

    @ApiModelProperty(value = "活动id")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String activityId;

    @ApiModelProperty(value = "服务类型")
    private String type;

    @ApiModelProperty(value = "照片")
    private String coverImg;

    @ApiModelProperty(value = "浏览量")
    private int browseNumber;

    @ApiModelProperty(value = "是否参加活动：1.是，0.否")
    private int activityFlag;

    @ApiModelProperty(value = "是否是热门服务：1.是，0.否")
    private int popularFlag;

    @ApiModelProperty(value = "联系手机号")
    private String contactNumber;

    @ApiModelProperty(value = "服务所在城市")
    private String serviceCity;

    public void copyFrom(FtService source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
